package com.zhongpengcheng.controller.common;

import cn.hutool.core.lang.Dict;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 基础接口，提供基础应用信息及所提供服务的请求地址
 *
 * @author zhongpengcheng
 * @date 2021/08/31 15:42
 **/
@RestController
public class BaseController {
    @Value("https://api.zhongpengcheng.com/")
    private String baseURL;

    @RequestMapping("/")
    public Dict application() {
        return Dict.create()
                .set("spine_url", baseURL + "spine")
                .set("user_url", baseURL + "user")
                .set("common_url", baseURL + "common")
                .set("blog_url", baseURL + "blog")
                .set("jar-game_url", baseURL + "jar-game");
    }
}
